package com.wzz.config;

import com.wzz.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author: 星川
 * @Date: 2023/07/11/23:17
 * @Description:
 */

//@Component
//public class AutoSaveTask {
//
//    @Autowired
//    private TaskService taskService;
//
//    @Scheduled(cron = "0 0 * * * *") // 每小时执行一次
//    public void performAutoSave() {
//        // 假设每次自动保存的数据是 "Auto Save"
//        taskService.saveTask("Auto Save");
//    }
//}
